// Default empty project template
#ifndef BangoBlackberry10App_HPP_
#define BangoBlackberry10App_HPP_

#include <QObject>
#include <QtCore>
#include <QDebug>
#include <bb/cascades/Application>
#include <bb/cascades/QmlDocument>
#include <bb/cascades/AbstractPane>
#include <bb/system/SystemToast>
#include <bb/cascades/TextField>

#include <BangoAgent.h>
#include "BangoLoggingLevel.h"
#include "BangoSessionEvents.h"

class BangoAgent;
class BangoLoggingLevel;
class BangoSessionEvents;

using namespace bb::cascades;
using namespace bb::system;
namespace bb { namespace cascades { class Application; }}

/*!
 * @brief Application pane object
 *
 *Use this object to create and init app UI, to create context objects, to register the new meta types etc.
 */
class BangoBlackberry10App : public QObject
{
    Q_OBJECT
public:
    BangoBlackberry10App();
    virtual ~BangoBlackberry10App();

    void onStart();

    Q_INVOKABLE
	void LoggingLevelTest();
	Q_INVOKABLE
	void Log();
	Q_INVOKABLE
	void onDemandVideoStart();
	Q_INVOKABLE
	void onDemandVideoStop();
	Q_INVOKABLE
	void LiveVideoStart();
	Q_INVOKABLE
	void LiveVideoStop();
	Q_INVOKABLE
	void Search();
	Q_INVOKABLE
	void Idle();
	Q_INVOKABLE
	void Resume();
	Q_INVOKABLE
	void PageView();
	Q_INVOKABLE
	void Error();
	Q_INVOKABLE
	void ViewBatch();
	Q_INVOKABLE
	void Reset();
	Q_INVOKABLE
	void Clear();
	Q_INVOKABLE
	void Exit();
	Q_INVOKABLE
	void PostNow();
	void ShowMessage(QString messageToShow);
	QString EventName();
	QString EventValue();
	QString EventDetail();
	QMap<QString, QString> EventParameters();
	int GetOverload();

/*
 * Public slots to call on app exit, moving to background, and moving to foreground
 * to call end session and start session events
 */
public Q_SLOTS:
	void onManualExit();
	void onAsleep();
	void onAwake();

private:
	bool loadQMLScene();
	static const QString TAG;
	SystemToast * _systemToast;
	TextField * _eventName;
	TextField *_eventValue;
	TextField *_eventDetail;
	TextField *_param1Name;
	TextField *_param2Name;
	TextField *_param1Value;
	TextField *_param2Value;

};


#endif /* BangoBlackberry10App_HPP_ */
